(function(){
	  jQuery(".btnDelete").on("click", function () {
		  var rowid = jQuery(this).attr("id"); 
		  $.springLemonDialog({
				content: '确定删除文件？',// 确认文本
				clickButton: function (sender, modal, index) {// 按钮事件处理
					if(index==0){
						jQuery("#loadingImage").show();
						 var url = window.rootPath + "/a/files/delete/" + rowid;
					        jQuery.ajax({
					            url: encodeURI(url),
					            type: "post",
					            contentType:"application/json;charset=utf-8",
					            success: function (data) {
					                var table = document.getElementById("fileTable");
					                var row = jQuery("#" + rowid).closest("tr");
					                row.remove();
									jQuery("#loadingImage").hide();
									 jQuery('.backBtn').on("click", function () {
										  location.reload()
									  });
									 
					            }
					     });
					}
					$(this).closeDialog(modal);
					
				}
			 });
		  
	    });
	  
	 
})();